package com.hc.testaudio.ui;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;

import com.hc.testaudio.R;
import com.hc.testaudio.base.BaseActivity;
import com.hc.testaudio.util.AudioRecordHelper;
import com.hc.testaudio.util.TestCreateAudioData;

/**
 *
 */
public class TestAudioRecordActivity extends BaseActivity {
    AudioRecordHelper mAudioRecordHelper;

    public static void startActivity(Activity activity) {
        activity.startActivity(new Intent(activity, TestAudioRecordActivity.class));
    }

    @Override
    protected int getLayoutId() {
        return R.layout.test_audio_record_activity;
    }

    @Override
    protected void initView(Bundle savedInstanceState) {
        mAudioRecordHelper = new AudioRecordHelper(getYcManage());
        findViewById(R.id.audioRecordStartBtn).setOnClickListener(v -> {
//            TestCreateAudioData.create();
            mAudioRecordHelper.start();
        });
        findViewById(R.id.audioRecordEndBtn).setOnClickListener(v -> {
            mAudioRecordHelper.stopRecord();
        });
    }
}
